Rectangles and General Polygon Routines

See also Vertex calls above. The way in which filled polygons (including circles and arcs) are treated depends on the mode that has been set with the polymode call.

There are variations on all these routines that end in s and also end in i.

s
: These variations they take arguments of type Scoord.
i
: These variations they take arguments of type Icoord.

void rect
(Coord x1,Coorc y1,COord x2,Coord y2)
Draw a rectangle.

void rectf
(Coord x1,Coord y1,Coord x2,Coord y2)
Draw a filled rectangle. (How the filling is done may be changed by calling polymode , if this call has been compilied into the library).

void poly2
(long n,Coord points[][2])
Construct a (x, y) polygon from an array of points provided by the user.

void polf2
(long n,Coord points[][2])
Construct a filled (x, y) polygon from an array of points provided by the user. (How the filling is done may be changed by calling polymode , if this call has been compilied into the library).

void poly
(long n,float points [][3])
Construct a polygon from an array of points provided by the user.

void polf
(long n,Coord points[][3])
Construct a filled polygon from an array of points provided by the user. (How the filling is done may be changed by calling polymode , if this call has been compilied into the library).

void backface
(Boolean onoff)
Turns on culling of backfacing polygons. A polygon is backfacing if it's orientation in screen coords is clockwise.

void frontface
(Boolean onoff)
Turns on culling of frontfacing polygons. A polygon is frontfacing if it's orientation in screen coords is anticlockwise.